<template>
  <div>
    <px-table v-loading="loading" :data="typeList" height="200" show-overflow-tooltip border>
      <px-table-column label="Time" prop="eventTime">
        <template #default="scope">
          <span>{{ scope.row.eventTime ? scope.row.eventTime : "-" }}</span>
        </template>
      </px-table-column>
      <px-table-column label="Alarm Type" prop="alarmType">
        <template #default="scope">
          <span>{{ scope.row.alarmType ? scope.row.alarmType : "-" }}</span>
        </template>
      </px-table-column>

      <px-table-column label="Value" prop="pointValue">
        <template #default="scope">
          <span>{{ scope.row.pointValue ? scope.row.pointValue : "-" }}</span>
        </template>
      </px-table-column>

      <px-table-column label="Indicate Name" width="160" prop="indicatorName">
        <template #default="scope">
          <span>{{ scope.row.indicatorName ? scope.row.indicatorName : "-" }}</span>
        </template>
      </px-table-column>
      <px-table-column fixed="right" label="操作" align="center" width="140">
        <template #default="scope">
          <px-button v-if="scope.row.status != 'INVALID'" link type="primary" @click="handleEditor(scope.row)">
            <px-tooltip class="box-item" content="批注" placement="top">
              <px-icon><EditPen /></px-icon> </px-tooltip
          ></px-button>
          <px-button v-if="scope.row.status != 'INVALID'" link type="primary" @click="getcontentList(scope.row.id)">
            <px-tooltip class="box-item" content="批注历史" placement="top">
              <px-icon><Time /></px-icon></px-tooltip
          ></px-button>
        </template>
      </px-table-column>
      <template #empty>
        <px-empty :image-size="150" />
      </template>
    </px-table>

    <pagination
      v-model:page="queryParams.pageNum"
      v-model:limit="queryParams.pageSize"
      style="margin-bottom: -10px"
      :total="total"
      @pagination="getList"
    />
    <px-dialog v-model="contentVisible" draggable clickHideContent title="批注历史" width="956" align-center>
      <px-table v-loading="loading" class="digtable1" :data="contentList" height="250" show-overflow-tooltip border>
        <px-table-column label="Update Time" prop="createTime">
          <template #default="scope">
            <span>{{ scope.row.createTime }}</span>
          </template>
        </px-table-column>
        <px-table-column label="Update user" prop="creator">
          <template #default="scope">
            <span>{{ scope.row.creator }}</span>
          </template>
        </px-table-column>
        <px-table-column label="Content" prop="content">
          <template #default="scope">
            <span>{{ scope.row.content }}</span>
          </template>
        </px-table-column>

        <template #empty>
          <px-empty :image-size="150" />
        </template>
      </px-table>
      <pagination
        v-model:page="queryParams2.pageNum"
        v-model:limit="queryParams2.pageSize"
        style="margin-bottom: -10px"
        :total="total2"
        @pagination="getcontentList"
      />
      <!-- <template #footer>
        <span class="dialog-footer">
          <px-button @click="progressVisible = false">取消</px-button>
          <px-button type="primary" @click="addRukudetails()"> 确认 </px-button>
        </span>
      </template> -->
    </px-dialog>
    <px-dialog v-model="contentTextVisible" draggable clickHideContent title="批注" width="677" align-center>
      <px-row class="contentrow">
        <px-col :span="12">
          <span> Time : </span>
          {{ contentvalue.createTime }}
        </px-col>
        <px-col :span="12">
          <span> Indicate Name : </span>
          {{ contentvalue.indicatorName }}
        </px-col>
      </px-row>
      <px-row class="contentrow">
        <px-col :span="12">
          <span> Alarm Type : </span>
          {{ contentvalue.alarmType }}
        </px-col>
        <px-col :span="12">
          <span> Value (ppm) : </span>
          {{ contentvalue.pointValue }}
        </px-col>
      </px-row>
      <px-row class="contentrow">
        <px-col :span="24">
          <span> 批注 :</span>
          <px-input v-model="constenttext" style="margin-top: 16px" :rows="2" type="textarea" placeholder="请输入" />
        </px-col>
      </px-row>
      <template #footer>
        <span class="dialog-footer">
          <px-button @click="contentTextVisible = false">取消</px-button>
          <px-button type="primary" @click="addcontent()"> 保存 </px-button>
        </span>
      </template>
    </px-dialog>
  </div>
</template>

<script setup>
import { ref, toRefs, reactive, watch } from "vue";
import { spcIndicatorquerySpcAnalysisResultList, spcNotequeryList, spcNoteadd } from "@/api/spc";
import { PxMessage } from "px-ui";
const props = defineProps({
  activeName: {
    type: String,
    default: ""
  },
  jobIdList: {
    type: Array,
    default: () => []
  },
  dateSpc: {
    type: String,
    default: ""
  }
});
const total = ref(10);
const total2 = ref(10);
const contentVisible = ref(false);
const contentTextVisible = ref(false);
const loading = ref(true);
const data = reactive({
  typeList: [],
  contentList: [],
  contentvalue: {},
  constenttext: "",
  queryParams: {
    orderByColumn: "",
    isAsc: "",
    planName: "",
    checkTypeCode: "",
    approveStatus: "",
    taskStatus: "",
    createrId: "",
    orderBy: "",
    pageNum: 1,
    pageSize: 10
  },
  queryParams2: {
    orderByColumn: "",
    isAsc: "",
    planName: "",
    checkTypeCode: "",
    approveStatus: "",
    taskStatus: "",
    createrId: "",
    orderBy: "",
    pageNum: 1,
    pageSize: 10
  }
});
const { queryParams, typeList, contentList, queryParams2, contentvalue, constenttext } = toRefs(data);

watch(
  () => props.activeName,
  newOption => {
    console.log(newOption);
    getList();
  }
);

watch(
  () => props.jobIdList,
  newOption => {
    console.log(newOption);
    getList();
  }
);

watch(
  () => props.dateSpc,
  newOption => {
    console.log(newOption);
    getList();
  }
);
function formatDate(date) {
  const year = date.getFullYear();
  const month = (date.getMonth() + 1).toString().padStart(2, "0");
  const day = date.getDate().toString().padStart(2, "0");
  const h = date.getHours().toString().padStart(2, "0");
  const m = date.getMinutes().toString().padStart(2, "0");
  const s = date.getSeconds().toString().padStart(2, "0");
  return `${year}-${month}-${day} ${h}:${m}:${s}`;
}
function getList() {
  const end = new Date();
  const start = new Date();
  start.setHours(0, 0, 0, 0);
  start.setTime(start.getTime());
  loading.value = true;
  // if (props.dateSpc != "" && props.jobIdList.length > 0 && props.alarmType != "") {
  if (props.dateSpc != "" && props.alarmType != "") {
    // spcIndicatorquerySpcAnalysisResultList({
    //   pageNum: queryParams.value.pageNum,
    //   pageSize: queryParams.value.pageSize,
    //   jobIdList: props.jobIdList,
    //   alarmType: props.activeName == "all" ? "" : props.activeName,
    //   startTime: props.dateSpc,
    //   endTime: props.dateSpc
    // }).then(res => {
    // if (res != null) {
    //   typeList.value = res.pageResponse.data;
    //   total.value = res.pageResponse.total;
    // } else {
    //   if (props.activeName == "all") {
    //     typeList.value = [
    //       {
    //         id: 196934,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 65,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193507,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 226,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193127,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 60,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191753,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 46,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191202,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 188573,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 89,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180662,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180473,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180472,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180265,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 85,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 196934,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 65,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193507,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 226,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193127,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 60,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191753,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 46,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191202,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 188573,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 89,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180662,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180473,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180472,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180265,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 85,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 196934,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 65,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193507,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 226,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193127,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 60,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191753,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 46,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191202,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 188573,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 89,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180662,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180473,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180472,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180265,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 85,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 196934,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 65,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193507,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 226,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193127,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 60,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191753,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 46,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191202,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 188573,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 89,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180662,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180473,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180472,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180265,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 85,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 191202,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 188573,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 89,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180662,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 61,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180473,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180472,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 87,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 180265,
    //         indicatorId: 10,
    //         indicatorName: "水课WATER_BAL_R_UPW005",
    //         point: "WATER_BAL_R_UPW005",
    //         alarmType: "OOC",
    //         pointValue: 85,
    //         createTime: formatDate(end)
    //       }
    //     ];

    //     total.value = 46;
    //   }
    //   if (props.activeName == "ooc") {
    //     typeList.value = [
    //       {
    //         id: 196142,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 74,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 196032,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 35,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 194104,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 212,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 193511,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 90,
    //         createTime: "2024-07-19 11:31:35"
    //       },
    //       {
    //         id: 193164,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 79,
    //         createTime: "2024-07-19 11:31:32"
    //       },
    //       {
    //         id: 192086,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 48,
    //         createTime: "2024-07-19 11:31:22"
    //       },
    //       {
    //         id: 191752,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 271,
    //         createTime: "2024-07-19 11:31:18"
    //       },
    //       {
    //         id: 191647,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 93,
    //         createTime: "2024-07-19 11:31:17"
    //       },
    //       {
    //         id: 191158,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 249,
    //         createTime: "2024-07-19 11:31:12"
    //       },
    //       {
    //         id: 196142,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 74,
    //         createTime: "2024-07-19 11:32:00"
    //       },
    //       {
    //         id: 196032,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 35,
    //         createTime: "2024-07-19 11:31:59"
    //       },
    //       {
    //         id: 194104,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 212,
    //         createTime: "2024-07-19 11:31:41"
    //       },
    //       {
    //         id: 193511,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 90,
    //         createTime: "2024-07-19 11:31:35"
    //       },
    //       {
    //         id: 193164,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 79,
    //         createTime: "2024-07-19 11:31:32"
    //       },
    //       {
    //         id: 192086,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 48,
    //         createTime: "2024-07-19 11:31:22"
    //       },
    //       {
    //         id: 191752,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 271,
    //         createTime: "2024-07-19 11:31:18"
    //       },
    //       {
    //         id: 191647,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 93,
    //         createTime: "2024-07-19 11:31:17"
    //       },
    //       {
    //         id: 191158,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "OOC",
    //         pointValue: 249,
    //         createTime: "2024-07-19 11:31:12"
    //       }
    //     ];

    //     total.value = 18;
    //   }
    //   if (props.activeName == "oow") {
    //     typeList.value = [
    //       {
    //         id: 179621,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 179620,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 179604,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 179603,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179621,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179620,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179604,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179603,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179621,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179620,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179604,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179603,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179621,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179620,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 37,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179604,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       },
    //       {
    //         id: 179603,
    //         indicatorId: 14,
    //         indicatorName: "水课WATER_BAL_R_UPW009",
    //         point: "WATER_BAL_R_UPW009",
    //         alarmType: "OOW",
    //         pointValue: 34,
    //         createTime: "2024-07-19 11:29:01"
    //       }
    //     ];

    //     total.value = 16;
    //   }
    //   if (props.activeName == "oos") {
    //     typeList.value = [
    //       {
    //         id: 185543,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 185542,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 185541,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: formatDate(end)
    //       },
    //       {
    //         id: 185543,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185542,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185541,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185543,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185542,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185541,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185543,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185542,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       },
    //       {
    //         id: 185541,
    //         indicatorId: 9,
    //         indicatorName: "水课WATER_BAL_R_UPW004",
    //         point: "WATER_BAL_R_UPW004",
    //         alarmType: "平衡事件",
    //         pointValue: 289,
    //         createTime: "2024-07-19 11:30:16"
    //       }
    //     ];
    //     total.value = 12;
    //   }
    // }
    // });
    if (props.activeName == "all") {
      typeList.value = [
        {
          id: 196934,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 65,
          createTime: formatDate(end)
        },
        {
          id: 193507,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 226,
          createTime: formatDate(end)
        },
        {
          id: 193127,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 60,
          createTime: formatDate(end)
        },
        {
          id: 191753,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 46,
          createTime: formatDate(end)
        },
        {
          id: 191202,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 188573,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 89,
          createTime: formatDate(end)
        },
        {
          id: 180662,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 180473,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180472,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180265,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 85,
          createTime: formatDate(end)
        },
        {
          id: 196934,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 65,
          createTime: formatDate(end)
        },
        {
          id: 193507,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 226,
          createTime: formatDate(end)
        },
        {
          id: 193127,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 60,
          createTime: formatDate(end)
        },
        {
          id: 191753,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 46,
          createTime: formatDate(end)
        },
        {
          id: 191202,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 188573,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 89,
          createTime: formatDate(end)
        },
        {
          id: 180662,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 180473,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180472,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180265,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 85,
          createTime: formatDate(end)
        },
        {
          id: 196934,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 65,
          createTime: formatDate(end)
        },
        {
          id: 193507,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 226,
          createTime: formatDate(end)
        },
        {
          id: 193127,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 60,
          createTime: formatDate(end)
        },
        {
          id: 191753,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 46,
          createTime: formatDate(end)
        },
        {
          id: 191202,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 188573,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 89,
          createTime: formatDate(end)
        },
        {
          id: 180662,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 180473,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180472,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180265,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 85,
          createTime: formatDate(end)
        },
        {
          id: 196934,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 65,
          createTime: formatDate(end)
        },
        {
          id: 193507,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 226,
          createTime: formatDate(end)
        },
        {
          id: 193127,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 60,
          createTime: formatDate(end)
        },
        {
          id: 191753,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 46,
          createTime: formatDate(end)
        },
        {
          id: 191202,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 188573,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 89,
          createTime: formatDate(end)
        },
        {
          id: 180662,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 180473,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180472,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180265,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 85,
          createTime: formatDate(end)
        },
        {
          id: 191202,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 188573,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 89,
          createTime: formatDate(end)
        },
        {
          id: 180662,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 61,
          createTime: formatDate(end)
        },
        {
          id: 180473,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180472,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 87,
          createTime: formatDate(end)
        },
        {
          id: 180265,
          indicatorId: 10,
          indicatorName: "水课WATER_BAL_R_UPW005",
          point: "WATER_BAL_R_UPW005",
          alarmType: "OOC",
          pointValue: 85,
          createTime: formatDate(end)
        }
      ];

      total.value = 46;
    }
    if (props.activeName == "ooc") {
      typeList.value = [
        {
          id: 196142,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 74,
          createTime: formatDate(end)
        },
        {
          id: 196032,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 35,
          createTime: formatDate(end)
        },
        {
          id: 194104,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 212,
          createTime: formatDate(end)
        },
        {
          id: 193511,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 90,
          createTime: "2024-07-19 11:31:35"
        },
        {
          id: 193164,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 79,
          createTime: "2024-07-19 11:31:32"
        },
        {
          id: 192086,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 48,
          createTime: "2024-07-19 11:31:22"
        },
        {
          id: 191752,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 271,
          createTime: "2024-07-19 11:31:18"
        },
        {
          id: 191647,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 93,
          createTime: "2024-07-19 11:31:17"
        },
        {
          id: 191158,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 249,
          createTime: "2024-07-19 11:31:12"
        },
        {
          id: 196142,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 74,
          createTime: "2024-07-19 11:32:00"
        },
        {
          id: 196032,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 35,
          createTime: "2024-07-19 11:31:59"
        },
        {
          id: 194104,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 212,
          createTime: "2024-07-19 11:31:41"
        },
        {
          id: 193511,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 90,
          createTime: "2024-07-19 11:31:35"
        },
        {
          id: 193164,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 79,
          createTime: "2024-07-19 11:31:32"
        },
        {
          id: 192086,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 48,
          createTime: "2024-07-19 11:31:22"
        },
        {
          id: 191752,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 271,
          createTime: "2024-07-19 11:31:18"
        },
        {
          id: 191647,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 93,
          createTime: "2024-07-19 11:31:17"
        },
        {
          id: 191158,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "OOC",
          pointValue: 249,
          createTime: "2024-07-19 11:31:12"
        }
      ];

      total.value = 18;
    }
    if (props.activeName == "oow") {
      typeList.value = [
        {
          id: 179621,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: formatDate(end)
        },
        {
          id: 179620,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: formatDate(end)
        },
        {
          id: 179604,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: formatDate(end)
        },
        {
          id: 179603,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179621,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179620,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179604,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179603,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179621,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179620,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179604,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179603,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179621,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179620,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 37,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179604,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        },
        {
          id: 179603,
          indicatorId: 14,
          indicatorName: "水课WATER_BAL_R_UPW009",
          point: "WATER_BAL_R_UPW009",
          alarmType: "OOW",
          pointValue: 34,
          createTime: "2024-07-19 11:29:01"
        }
      ];

      total.value = 16;
    }
    if (props.activeName == "oos") {
      typeList.value = [
        {
          id: 185543,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: formatDate(end)
        },
        {
          id: 185542,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: formatDate(end)
        },
        {
          id: 185541,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: formatDate(end)
        },
        {
          id: 185543,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185542,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185541,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185543,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185542,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185541,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185543,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185542,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        },
        {
          id: 185541,
          indicatorId: 9,
          indicatorName: "水课WATER_BAL_R_UPW004",
          point: "WATER_BAL_R_UPW004",
          alarmType: "平衡事件",
          pointValue: 289,
          createTime: "2024-07-19 11:30:16"
        }
      ];
      total.value = 12;
    }
  }

  loading.value = false;
}
getList();

const getcontentList = businessKey => {
  contentVisible.value = true;
  spcNotequeryList({
    pageNum: queryParams2.value.pageNum,
    pageSize: queryParams2.value.pageSize,
    businessKey: businessKey
  }).then(res => {
    console.log(res);
    contentList.value = res.data;
    total2.value = res.total;
  });
};

const addcontent = () => {
  spcNoteadd({
    businessKey: contentvalue.value.id,
    content: constenttext.value
  }).then(res => {
    console.log(res);
    PxMessage({
      message: "批注成功",
      type: "success"
    });
    contentTextVisible.value = false;
  });
};
const handleEditor = row => {
  contentvalue.value = row;
  constenttext.value = "";
  console.log(contentvalue.value);
  contentTextVisible.value = true;
};
</script>
<style scoped lang="scss">
.contentrow {
  margin-bottom: 16px;
  font-size: 14px;
  font-weight: 400;
  line-height: 22px;
  color: #000;
}
</style>
